//
//  AlertInputButton.swift
//  whale
//
//  Created by topnet on 2022/3/8.
//

import UIKit

class AlertInputButton: UIButton {

    var onTap: VoidClosure?
    var inputHeight: CGFloat = 346
    required convenience init() {
        self.init(type: .custom)
        addTarget(self, action: #selector(tapAction), for: .touchUpInside)
    }
    
    @objc private func tapAction() {
        if isFirstResponder {
            resignFirstResponder()
        }else {
            becomeFirstResponder()
        }
        onTap?()
    }
    
    override var canBecomeFirstResponder: Bool {
        return true
    }

    
}
